import styles from './index.less';
import {useSelector, useDispatch,useStore } from 'umi'
import { useEffect } from 'react';
export default function IndexPage() {
  // useSelector 通过getState()方法找到demo的data
  let state = useSelector(state=>state)  
  // useStore：如果store中的state改变，这个将不会自动更新
  //const state = useStore(state.getState())
  const dispatch = useDispatch()
  // console.log('useSelector..',state);
  // console.log('dispatch',dispatch);
  
  useEffect(() => {
    dispatch({
      type:"index/getBanner"
    })
  }, [])
  return (
    <div>

    </div>
  );
}
